package com.config;


import org.springframework.amqp.core.*;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class RabbitMQConfig {

    /**
     * 定义交换机
     * @return
     */
    @Bean
    public DirectExchange s2020_1_3_DirectExchange()
    {
        return new DirectExchange("s2020_1_3_DirectExchange");
    }


    @Bean
    public Queue s2020_1_3_queue()
    {
        return new Queue("s2020_1_3_queue");
    }

    @Bean
    public Binding binding_s2020_1_3_DirectExchange______s2020_1_3_queue()
    {
        return BindingBuilder.bind(s2020_1_3_queue()).to(s2020_1_3_DirectExchange()).with("key");
    }


}
